How can I view the source code for a particular `predict` function?

Posted by merlin2011 on Stack Overflow See other posts from Stack Overflow or by merlin2011
Published on 2013-11-06T03:35:14Z Indexed on 2013/11/06 3:54 UTC
Read the original article Hit count: 54

Filed under:

Based on the documentation, predict is a polymorphic function in R and a different function is actually called depending on what is passed as the first argument.

However, the documentation does not give any information about the names of the functions that predict actually invokes for any particular class.

Normally, one could type the name of a function to get its source, but this does not work with predict.

If I want to view the source code for the predict function when invoked on objects of the type glmnet, what is the easiest way?

© Stack Overflow or respective owner

Related posts about r